<?php
/**
 * Email:zhaojunlike@gmail.com
 * Date: 2017/1/15
 * Time: 12:55
 */
require "./load.php";


//get
$get_phone = trim(@$_GET['get_phone']);
$get_key = trim(@$_GET['get_key']);
$get_driver_no = @$_GET['get_driver_no'];
$get_driver_status = @$_GET['get_driver_status'];
$timeNow = date("Y-m-d H:i:s");

if ($get_key != SIGNKEY) {
    exit("error");
}

//发送短信通知


$phoneArr = parse_phone($get_phone, ",");

foreach ($phoneArr as $v) {
    $sendRet = ali_send_sms_notice("{$get_driver_no}", get_status_str($get_driver_status), $v);
    $ret = file_put_contents("./Logs/log.log", "手机号:{$v},时间：{$timeNow},Send:{$sendRet},事件:" . get_status_str($get_driver_status) . ",设备号:{$get_driver_no}" . "\n", FILE_APPEND);
    echo json_encode(array($timeNow, $ret));
}

